package com.kim.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NonNull;

import java.time.LocalDateTime;

@Data
public class User {
    @NotNull
    private Integer id;//主键ID
    private String username;//用户名
    @JsonIgnore //让springmvc把当前对象转换成json字符串的时候，忽略password,最终的json字符串就没有password这个属性了
    private String password;//密码

    private String fullName;//全名
    private String phoneNumber; //电话号码
    @Email
    private String email;//邮箱
    private String userPic;//用户头像地址
    private LocalDateTime createdAt;//创建时间
    private LocalDateTime updatedAt;//更新时间
}
